﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using OnlineVideos.Data;
using System.Windows.Navigation;
using OnlineVideos.UI;
using Common.Library;
using OnlineVideos.Common;
using OnlineVideos.Utilities;
using Common.Utilities;

namespace OnlineVideos
{
    public partial class QuizExitPopUp : UserControl
    {
        public QuizExitPopUp()
        {
            InitializeComponent();
            PageHelper.RemoveEntryFromBackStack("SubjectDetail");
        }

        private void btnok_Click(object sender, RoutedEventArgs e)
        {
            Close();
            PageHelper.RemoveEntryFromBackStack("QuizExitPopUp");
            PageHelper.NavigateToDetailPage(AppResources.DetailPageName, AppSettings.ShowID);
            QuizManager.deletestoriongdata();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            SettingsHelper.Save("popclose","true");
            Close();
        }

        public void Show()
        {
            popMessage.IsOpen = true;
        }

        public void Close()
        {
            popMessage.IsOpen = false;
        }
    }
}
